home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14274 < prev    next >
Encoding:
Text File  |  1996-08-05  |  658 b   |  32 lines

  1. Path: arapaho.cse.ucsc.edu!ray
  2. From: ray@cse.ucsc.edu (Ray Swartz)
  3. Newsgroups: comp.lang.c++
  4. Subject: Friend declarations
  5. Date: 29 Mar 1996 19:55:59 GMT
  6. Organization: UC Santa Cruz CIS/CE
  7. Message-ID: <4jhf8f$s19@darkstar.UCSC.EDU>
  8. NNTP-Posting-Host: arapaho.cse.ucsc.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Does the declaration of a friend function inside a class declaration
  12. constitute a visible declaration of the friend function?
  13.  
  14. Here is sample code:
  15.  
  16. class X {
  17.    // ...
  18.    friend int f(int, int);
  19. };
  20.  
  21. Question: is f() now declared for use in a program or does there
  22. have to be a global scope declaration:
  23.  
  24. int f(int, int);
  25.  
  26. too?
  27.  
  28.  
  29. Thanks,
  30.  
  31. Ray Swartz
  32.